﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ULSLogParser;

namespace SharePointManager
{
    public partial class QuickListFilter : Form
    {
        public QuickListFilter()
        {
            InitializeComponent();
        }

       

        private void buttonOk_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            if (buttonCancel.Text == "Remove filter")
            {
                DialogResult = System.Windows.Forms.DialogResult.Cancel;
            }
            else
                DialogResult = System.Windows.Forms.DialogResult.Ignore;
            this.Close();
        }

        private void textBoxTo_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textBoxFrom.Text) &&
    !string.IsNullOrEmpty(textBoxTo.Text))
                buttonOk.Enabled = true;
        }

        private void textBoxFrom_TextChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textBoxFrom.Text) &&
    !string.IsNullOrEmpty(textBoxTo.Text))
                buttonOk.Enabled = true;
        }

    }
}
